package com.guigu.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class LoginController {

    @PostMapping("/login")
    public String login() {
        return "redirect:main.html";
    }

    @PostMapping("/toMain")
    public String main() {
        return "redirect:main.html";
    }

    @PostMapping("/toError")
    public String error() {
        return "redirect:error.html";
    }

    @GetMapping("/www")
    @ResponseBody
    public String www() {
        return "wwwww";
    }

    //----------------thymeleaf-------------------
    @GetMapping("/demo2")
    public String demo() {
        return "demo";
    }

    @GetMapping("/showLogin")
    public String showLogin() {
        return "login2";
    }


}
